#ifndef USERDATA_H
#define USERDATA_H

#define NUM_ALARM_MAX   10

#define NUM_RELAY_DEF   5
#define NUM_RELAY_MAX   10

#define NUM_BOARD_DEF   1

typedef struct
{
    qint32  hour;
    qint32  minute;
    qint32  action;
} AlarmData;

typedef struct
{
    qint32  temperature;
    qint32  humidity;
    qint32  action;
} WeatherData;

typedef struct
{
    qint32      boardId;    // read only
    qint32      relayId;    // read only
    QString     name;
    qint32      groupId;
    qint32      pushDelay;  // [sec]
    qint32      numAlarm;
    AlarmData   alarm[NUM_ALARM_MAX];
} RelayData;

typedef struct
{
    qint32      id;         // read only
    QString     name;
    qint32      type;
    qint32      numRelay;
    RelayData   relay[NUM_RELAY_MAX];
} BoardData;


#endif // USERDATA_H
